'use strict';

/**
 * Config for the router
 */
angular.module('app')
    .run(
        ['$rootScope', '$state', '$stateParams',
            function ($rootScope, $state, $stateParams) {
                $rootScope.$state = $state;
                $rootScope.$stateParams = $stateParams;
            }
        ]
    )
    .config(['$stateProvider', '$urlRouterProvider',
        function ($stateProvider, $urlRouterProvider) {

            $urlRouterProvider
                .otherwise('/app/home');
            $stateProvider
                .state('app', {
                    abstract: true,
                    url: '/app',
                    templateUrl: 'tpl/app.html'
                })
                .state('app.home', {
                    url: '/home',
                    templateUrl: 'tpl/home/home.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'vendor/jquery/echarts-2.2.7/build/dist/echarts-all.js',
                                    'js/controllers/home/home.js',
                                    'js/services/home/home.js',
                                    'css/content-css/home/home.css'
                                ]);
                            }]
                    }
                })

                //account
                .state('app.account', {
                    url: '/security/account',
                    templateUrl: 'tpl/security/account.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/security/account.js',
                                    'js/controllers/security/account.js']);
                            }]
                    }
                })
                .state('app.accountCreate', {
                    url: '/security/account/create',
                    templateUrl: 'tpl/security/account_add.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/security/account.js',
                                    'js/controllers/security/account.js']);
                            }]
                    }
                })
                .state('app.accountEdit', {
                    url: '/security/account/edit/:systemUserId',
                    templateUrl: 'tpl/security/account_edit.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/security/account.js',
                                    'js/controllers/security/account.js']);
                            }]
                    }
                })

                //role
                .state('app.role', {
                    url: '/role',
                    templateUrl: 'tpl/security/role.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/security/role.js',
                                    'js/controllers/security/role.js']);
                            }]
                    }
                })

                .state('app.roleCreate', {
                    url: '/security/role/create',
                    templateUrl: 'tpl/security/role_add.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/security/role.js',
                                    'js/controllers/security/role.js']);
                            }]
                    }
                })
                .state('app.roleEdit', {
                    url: '/security/role/edit/:id',
                    templateUrl: 'tpl/security/role_edit.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/security/role.js',
                                    'js/controllers/security/role.js']);
                            }]
                    }
                })


                .state('app.authorize', {
                    url: '/security/authorize/:id',
                    templateUrl: 'tpl/security/authorize.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load('angularBootstrapNavTree').then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'css/content-css/tree/tree.css',
                                            'js/services/security/authorize.js',
                                            'js/controllers/security/authorize.js'
                                        ]);
                                    }
                                );
                            }]
                    }
                })

                //orders
                .state('app.detail', {
                    url: '/orders/detail',
                    templateUrl: 'tpl/orders/detail.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load('ui.select').then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'css/content-css/orders/detail.css',
                                            'js/services/orders/orders.js',
                                            'js/controllers/orders/orders.js']);
                                    }
                                );
                            }]
                    }
                })
                .state('app.all', {
                    url: '/orders/all',
                    templateUrl: 'tpl/orders/all.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/orders.js',
                                    'js/controllers/orders/orders.js']);
                            }]
                    }
                })
                .state('app.ordersGoodsView', {
                    url: '/orders/goods/view/:id',
                    templateUrl: 'tpl/orders/orders_detail.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'css/content-css/orders/orders_detail.css',
                                    'js/services/orders/orders.js',
                                    'js/controllers/orders/orders.js']);
                            }]
                    }
                })

                .state('app.settleAccounts', {
                    url: '/orders/settle/accounts/:state',
                    templateUrl: 'tpl/orders/settle_accounts.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/orders.js',
                                    'js/controllers/orders/orders.js'
                                ]);
                            }]
                    }
                })

                .state('app.ordersPriceChange', {
                    url: '/orders/price/change/:id',
                    templateUrl: 'tpl/orders/orders_price_change.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/orders.js',
                                    'js/controllers/orders/orders.js']);
                            }]
                    }
                })


                .state('app.cancel', {
                    url: '/orders/cancel',
                    templateUrl: 'tpl/orders/cancel.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/orders.js',
                                    'js/controllers/orders/orders.js']);
                            }]
                    }
                })
                .state('app.ordersRefund', {
                    url: '/orders/orders/refund',
                    templateUrl: 'tpl/orders/orders_refund.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/refund.js',
                                    'js/controllers/orders/refund.js']);
                            }]
                    }
                })
                .state('app.goodsRefund', {
                    url: '/orders/goods/refund',
                    templateUrl: 'tpl/orders/goods_refund.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/refund.js',
                                    'js/controllers/orders/refund.js']);
                            }]
                    }
                })

                .state('app.goodsRefundFail', {
                    url: '/orders/goods/refund/:id',
                    templateUrl: 'tpl/orders/shop_refund_goods_fail.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/refund.js',
                                    'js/controllers/orders/refund.js']);
                            }]
                    }
                })

                .state('app.ordersRefundFail', {
                    url: '/orders/orders/refund/:id',
                    templateUrl: 'tpl/orders/shop_refund_money_fail.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/refund.js',
                                    'js/controllers/orders/refund.js']);
                            }]
                    }
                })

                .state('app.confirm', {
                    url: '/orders/confirm',
                    templateUrl: 'tpl/orders/confirm.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/orders.js',
                                    'js/controllers/orders/orders.js']);
                            }]
                    }
                })
                .state('app.complete', {
                    url: '/orders/complete',
                    templateUrl: 'tpl/orders/complete.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/orders.js',
                                    'js/controllers/orders/orders.js']);
                            }]
                    }
                })
                .state('app.wait', {
                    url: '/orders/wait',
                    templateUrl: 'tpl/orders/wait.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/orders.js',
                                    'js/controllers/orders/orders.js']);
                            }]
                    }
                })
                .state('app.paid', {
                    url: '/orders/paid',
                    templateUrl: 'tpl/orders/paid.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load('ui.select').then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'js/services/orders/orders.js',
                                            'js/controllers/orders/orders.js']);
                                    }
                                );
                            }]
                    }

                })
                .state('app.shipped', {
                    url: '/orders/shipped',
                    templateUrl: 'tpl/orders/shipped.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/orders.js',
                                    'js/controllers/orders/orders.js']);
                            }]
                    }
                })
                .state('app.waitUse', {
                    url: '/orders/wait/use',
                    templateUrl: 'tpl/orders/wait_use.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/orders.js',
                                    'js/controllers/orders/orders.js']);
                            }]
                    }
                })
                .state('app.hasUse', {
                    url: '/orders/has/use',
                    templateUrl: 'tpl/orders/has_use.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/orders.js',
                                    'js/controllers/orders/orders.js']);
                            }]
                    }
                })
                .state('app.fail', {
                    url: '/orders/fail',
                    templateUrl: 'tpl/orders/fail.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/orders.js',
                                    'js/controllers/orders/orders.js']);
                            }]
                    }
                })
                .state('app.failin', {
                    url: '/orders/failin',
                    templateUrl: 'tpl/orders/failin.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/orders.js',
                                    'js/controllers/orders/orders.js']);
                            }]
                    }
                })
                .state('app.deliveryUpdate', {
                    url: '/orders/deliveryUpdate/:id',
                    templateUrl: 'tpl/orders/delivery_update.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/orders.js',
                                    'js/controllers/orders/orders.js']);
                            }]
                    }
                })

                .state('app.check', {
                    url: '/orders/check/:auth',
                    templateUrl: 'tpl/orders/check.html',
                    cache: true,
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/orders/check.js',
                                    'js/controllers/orders/check.js',
                                    'css/content-css/orders/check.css'
                                ]);
                            }]
                    }
                })

                //shop
                .state("app.shopDetailInfo", {
                    url: '/shop/detail/info',
                    templateUrl: 'tpl/shop/shop_detail_info.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/shop/shop_detail_info.js',
                                    'js/controllers/shop/shop_detail_info.js',
                                    'css/content-css/shop/shop_detail_info.css',
                                ]);
                            }]
                    }
                })


                .state("app.shopDetailEdit", {
                    url: '/shop/detail/edit',
                    templateUrl: 'tpl/shop/shop_detail_edit.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load('angularFileUpload').then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'css/content-css/upload/picture_upload.css',
                                            'css/content-css/shop/shop_detail_edit.css',
                                            'js/controllers/shop/shop_detail_edit.js',
                                            'js/services/shop/shop_detail_edit.js',
                                            'css/map.css'
                                        ]);
                                    }
                                );
                            }]
                    }
                })


                .state("app.shopBusinessEdit", {
                    url: '/shop/business/edit',
                    templateUrl: 'tpl/shop/shop_business_edit.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load('angularFileUpload').then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'css/content-css/shop/shop_detail_edit.css',
                                            'css/content-css/upload/picture_upload.css',
                                            'js/controllers/shop/shop_business_edit.js',
                                            'js/services/shop/shop_business_edit.js',
                                        ]);
                                    }
                                );
                            }]
                    }
                })
                .state("app.shopWechatConfig", {
                    url: '/shop/wechat/config',
                    templateUrl: 'tpl/shop/shop_wechat_config.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load('angularFileUpload').then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'js/controllers/shop/shop_wechat_config.js',
                                            'js/services/shop/shop_wechat_config.js',
                                        ]);
                                    }
                                );
                            }]
                    }
                })

                .state("app.shopDatum", {
                    url: '/shop/datum',
                    templateUrl: 'tpl/shop/shop_datum.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'css/content-css/shop/shop_datum.css'
                                ]);
                            }]
                    }

                })

                .state("app.shopBindUser", {
                    url: '/shop/bind/user',
                    templateUrl: 'tpl/shop/shop_bind_user.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/controllers/shop/shop_bind_user.js',
                                    'js/services/shop/shop_bind_user.js'
                                ]);
                            }]
                    }
                })

                .state("app.shopTechnician", {
                    url: '/shop/technician',
                    templateUrl: 'tpl/shop/shop_technician.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/controllers/shop/shop_technician.js',
                                    'js/services/shop/shop_technician.js'
                                ]);
                            }]
                    }
                })

                .state("app.shopTechnicianAdd", {
                    url: '/shop/technician/add',
                    templateUrl: 'tpl/shop/shop_technician_add.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load('angularFileUpload').then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'css/content-css/upload/picture_upload.css',
                                            'js/controllers/shop/shop_technician.js',
                                            'js/services/shop/shop_technician.js',
                                            'css/content-css/shop/shop_detail_edit.css'
                                        ]);
                                    }
                                );
                            }]
                    }
                })

                .state("app.shopTechnicianEdit", {
                    url: '/shop/technician/edit/:id',
                    templateUrl: 'tpl/shop/shop_technician_edit.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load('angularFileUpload').then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'css/content-css/upload/picture_upload.css',
                                            'js/controllers/shop/shop_technician.js',
                                            'js/services/shop/shop_technician.js',
                                            'css/content-css/shop/shop_detail_edit.css'
                                        ]);
                                    }
                                );
                            }]
                    }
                })

                //brand
                .state('app.brand', {
                    url: '/brand',
                    templateUrl: 'tpl/brand/brand.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/brand/brand.js',
                                    'js/services/brand/brand.js'
                                ]);
                            }
                        ]
                    }
                })
                .state("app.brandAdd", {
                    url: '/brand/add',
                    templateUrl: 'tpl/brand/brand_add.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load('angularFileUpload').then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'css/content-css/brand/brands.css',
                                            'css/content-css/upload/picture_upload.css',
                                            'js/services/brand/brand.js',
                                            'js/controllers/brand/brand.js',
                                        ]);
                                    }
                                );
                            }
                        ]
                    }
                })
                .state("app.brandEdit", {
                    url: '/brand/edit/:id',
                    templateUrl: 'tpl/brand/brand_edit.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load('angularFileUpload').then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'css/content-css/brand/brands.css',
                                            'css/content-css/upload/picture_upload.css',
                                            'js/services/brand/brand.js',
                                            'js/controllers/brand/brand.js',
                                        ]);
                                    }
                                );
                            }
                        ]
                    }
                })
                .state("app.brandDetail", {
                    url: '/brand/detail/:id',
                    templateUrl: 'tpl/brand/brand_detail.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/brand/brand.js',
                                    'js/services/brand/brand.js'
                                ]);
                            }
                        ]
                    }
                })
                //goods
                .state("app.goods", {
                    url: '/goods',
                    templateUrl: 'tpl/goods/goods.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load(['js/controllers/goods/goods.js', 'js/services/goods/goods.js']);
                            }]
                    }
                })

                .state("app.chainGoodsAdd", {
                    url: '/chain/goods/add',
                    templateUrl: 'tpl/goods/chain_goods_add.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/controllers/goods/chain_goods_add.js',
                                    'js/services/goods/chain_goods_add.js',
                                    'css/content-css/goods/chain_goods_add.css'
                                ]);
                            }]
                    }
                })

                .state("app.goodsAdd", {
                    url: '/goods/add',
                    templateUrl: 'tpl/goods/goods_add.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load(['angularFileUpload','ui.select']).then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'js/controllers/goods/goods_add.js',
                                            'js/services/goods/goods_add.js',
                                            'js/controllers/goods/goods_sku.js',
                                            'js/services/goods/goods_sku.js',
                                            'css/content-css/goods/goods_ae.css',
                                            'css/content-css/upload/picture_upload.css',
                                            'css/content-css/shop/shop_detail_edit.css'
                                        ]);
                                    }
                                );
                            }]
                    }

                })
                .state("app.goodsEdit", {
                    url: '/goods/edit/:id',
                    templateUrl: 'tpl/goods/goods_edit.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load(['angularFileUpload','ui.select']).then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'js/controllers/goods/goods_edit.js',
                                            'js/services/goods/goods_edit.js',
                                            'js/controllers/goods/goods_sku.js',
                                            'js/services/goods/goods_sku.js',
                                            'css/content-css/goods/goods_ae.css',
                                            'css/content-css/upload/picture_upload.css',
                                            'css/content-css/shop/shop_detail_edit.css'
                                        ]);
                                    }
                                );
                            }]
                    }


                })


                .state("app.goodsDetail", {
                    url: '/goods/detail/:id',
                    templateUrl: 'tpl/goods/goods_detail.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'css/content-css/goods/goods_detail.css',
                                    'js/controllers/goods/goods_detail.js',
                                    'js/services/goods/goods_detail.js'
                                ]);
                            }]
                    }
                })

                .state("app.goodsDetailPictures", {
                    url: '/goods/detail/pictures/:goodsId',
                    templateUrl: 'tpl/goods/goods_detail_pictures.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load('angularFileUpload').then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'css/content-css/upload/picture_upload.css',
                                            'css/content-css/goods/goods_ae.css',
                                            'js/controllers/goods/goods_detail_pictures.js',
                                            'js/services/goods/goods_detail_pictures.js'
                                        ]);
                                    }
                                );
                            }]
                    }
                })

                //shop_delivery
                .state("app.shopDelivery", {
                    url: '/shop/delivery',
                    templateUrl: 'tpl/shop/shop_delivery.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/shop/shop_delivery.js',
                                    'js/services/shop/shop_delivery.js'
                                ]);
                            }]
                    }
                })
                .state("app.shopDeliveryAdd", {
                    url: '/shop/delivery/add',
                    templateUrl: 'tpl/shop/shop_delivery_add.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/shop/shop_delivery_add.js',
                                    'js/services/shop/shop_delivery_add.js'
                                ]);
                            }]
                    }
                })
                .state("app.shopDeliveryEdit", {
                    url: '/shop/delivery/edit/:id',
                    templateUrl: 'tpl/shop/shop_delivery_edit.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/shop/shop_delivery_edit.js',
                                    'js/services/shop/shop_delivery_edit.js'
                                ]);
                            }]
                    }
                })

                //goods-type
                .state("app.goodsTypes", {
                    url: '/goods/types',
                    templateUrl: 'tpl/goods/goods_types.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load('angularFileUpload').then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'css/content-css/upload/picture_upload.css',
                                            'css/content-css/goods/goods_types.css',
                                            'js/controllers/goods/goods_types.js',
                                            'js/services/goods/goods_types.js'
                                        ]);
                                    }
                                );
                            }]
                    }
                })


                //goods-evaluate
                .state("app.goodsDetailevaluate", {
                    url: '/goods/detailevaluate/:id',
                    templateUrl: 'tpl/goods/goods_detail_evaluate.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/controllers/goods/goods_detail_evaluate.js',
                                    'js/services/goods/goods_detail_evaluate.js'
                                ]);
                            }]
                    }
                })

                //sku
                .state("app.sku", {
                    url: '/sku',
                    templateUrl: 'tpl/sku/sku.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load(['js/controllers/sku/sku.js', 'js/services/sku/sku.js']);
                            }]
                    }
                })


                .state("app.skuDetailInfo", {
                    url: '/sku/detail/:skuId',
                    templateUrl: 'tpl/sku/sku_detail_info.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load(['js/controllers/sku/sku_detail_info.js', 'js/services/sku/sku_detail_info.js']);
                            }]
                    }
                })

                //property
                .state("app.property", {
                    url: '/property',
                    templateUrl: 'tpl/property/property.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load(['js/controllers/property/property.js',
                                    'js/services/property/property.js']);
                            }]
                    }
                })

                .state("app.propertyHistory", {
                    url: '/property/history',
                    templateUrl: 'tpl/property/property_info.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load(['js/controllers/property/property.js',
                                    'js/services/property/property.js']);
                            }]
                    }
                })

                .state("app.goodsData", {
                    url: '/property/goods/history/:id',
                    templateUrl: 'tpl/property/property_goods_info.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load(['js/controllers/property/property.js',
                                    'js/services/property/property.js']);
                            }]
                    }
                })

                .state("app.withdraw", {
                    url: '/property/withdraw',
                    templateUrl: 'tpl/property/property_withdraw.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load(['js/controllers/property/property.js',
                                    'js/services/property/property.js']);
                            }]
                    }
                })

                //bank
                .state("app.bankCard", {
                    url: '/bankCard',
                    templateUrl: 'tpl/property/bank_card.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'css/content-css/member/member_card.css',
                                    'js/controllers/property/bank_card.js',
                                    'js/services/property/bank_card.js']);
                            }]
                    }
                })

                .state("app.bankCardAdd", {
                    url: '/bankCard/add',
                    templateUrl: 'tpl/property/bank_card_add.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'css/content-css/member/member_card.css',
                                    'js/controllers/property/bank_card.js',
                                    'js/services/property/bank_card.js']);
                            }]
                    }
                })

                //advertisement
                .state("app.advertisement", {
                    url: '/advertisement',
                    templateUrl: 'tpl/advertisement/advertisement.html'
                })
                .state("app.advertisementDetailInfo", {
                    url: '/advertisement/detail/info',
                    templateUrl: 'tpl/advertisement/advertisement_detail_info.html'
                })
                .state("app.advertisementDetailInfoEdit", {
                    url: '/advertisement/detail/info/edit',
                    templateUrl: 'tpl/advertisement/advertisement_detail_info_edit.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load(['css/content-css/advertisement/advertisement_detail_info.css']);
                            }]
                    }
                })
                .state("app.advertisementDetailInfoAdd", {
                    url: '/advertisement/detail/info/add',
                    templateUrl: 'tpl/advertisement/advertisement_detail_info_add.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load(['css/content-css/advertisement/advertisement_detail_info.css']);
                            }]
                    }
                })
                //member_card_use
                .state("app.memberCardUse", {
                    url: '/member/card/use',
                    templateUrl: 'tpl/member/member_card_use.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/controllers/member/member_card_use.js'
                                ]);
                            }]
                    }
                })

                //shop template
                .state('app.shopTemplateAdd', {
                    url: '/shop/template/add',
                    templateUrl: 'tpl/shop/shop_template_add.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'css/content-css/shop/shop_template_add.css',
                                    'js/controllers/shop/shop_template_add.js',
                                    'js/services/shop/shop_template_add.js'
                                ]);
                            }]
                    }
                })

                //modules
                .state('app.modules', {
                    url: '/modules',
                    templateUrl: 'tpl/modules/modules.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/modules/modules.js',
                                    'js/services/modules/modules.js'
                                ]);
                            }]
                    }

                })
                .state('app.modulesAdd', {
                    url: '/modules/add',
                    templateUrl: 'tpl/modules/modules_add.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/modules/modules_add.js',
                                    'js/services/modules/modules_add.js'
                                ]);
                            }]
                    }
                })
                .state('app.modulesEdit', {
                    url: '/modules/edit/:id',
                    templateUrl: 'tpl/modules/modules_edit.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/modules/modules_edit.js',
                                    'js/services/modules/modules_edit.js'
                                ]);
                            }]
                    }
                })
                .state('app.modulesGoods', {
                    url: '/modules/goods/:id',
                    templateUrl: 'tpl/modules/modules_goods.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/modules/modules_goods.js',
                                    'js/services/modules/modules_goods.js',
                                ]);
                            }]
                    }
                })
                .state('app.modulesAdvertisement', {
                    url: '/modules/advertisement/:modulesId',
                    templateUrl: 'tpl/modules/modules_advertisement.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/modules/modules_advertisement.js',
                                    'js/services/modules/modules_advertisement.js',
                                ]);
                            }]
                    }
                })
                .state('app.modulesAdvertisementAdd', {
                    url: '/modules/advertisement/add/:modulesId',
                    templateUrl: 'tpl/modules/modules_advertisement_add.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load('angularFileUpload').then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'css/content-css/upload/picture_upload.css',
                                            'js/controllers/modules/modules_advertisement_add.js',
                                            'js/services/modules/modules_advertisement_add.js',
                                        ]);
                                    }
                                );
                            }]
                    }
                })

                .state('app.modulesAdvertisementEdit', {
                    url: '/modules/advertisement/edit/:id/:modulesId',
                    templateUrl: 'tpl/modules/modules_advertisement_edit.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load('angularFileUpload').then(
                                    function () {
                                        return $ocLazyLoad.load([
                                            'css/content-css/upload/picture_upload.css',
                                            'js/controllers/modules/modules_advertisement_edit.js',
                                            'js/services/modules/modules_advertisement_edit.js',
                                        ]);
                                    }
                                );
                            }]
                    }
                })

                .state('app.modulesGoodsAdd', {
                    url: '/modules/goods/add/:id',
                    templateUrl: 'tpl/modules/modules_goods_add.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/modules/modules_goods_add.js',
                                    'js/services/modules/modules_goods_add.js',
                                ]);
                            }]
                    }
                })
                //column
                .state('app.column', {
                    url: '/column',
                    templateUrl: 'tpl/column/column.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/column/column.js',
                                    'js/services/column/column.js',
                                ]);
                            }]
                    }
                })

                .state('app.columnAdd', {
                    url: '/column/add',
                    templateUrl: 'tpl/column/column_add.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/column/column_add.js',
                                    'js/services/column/column_add.js',
                                ]);
                            }]
                    }
                })

                .state('app.columnEdit', {
                    url: '/column/edit/:id',
                    templateUrl: 'tpl/column/column_edit.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/column/column_edit.js',
                                    'js/services/column/column_edit.js',
                                ]);
                            }]
                    }
                })

                //coupons
                .state('app.coupons', {
                    url: '/coupons',
                    templateUrl: 'tpl/coupons/coupons.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load(['js/controllers/coupons/coupons.js', 'js/services/coupons/coupons.js']);
                            }]
                    }
                })
                .state('app.couponsDetailAdd', {
                    url: '/coupons/detail/add',
                    templateUrl: 'tpl/coupons/coupons_detail_add.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load(['js/controllers/coupons/coupons_detail_add.js', 'js/services/coupons/coupons_detail_add.js']);
                            }]
                    }
                })
                .state('app.couponsDetailEdit', {
                    url: '/coupons/detail/edit/:id',
                    templateUrl: 'tpl/coupons/coupons_detail_edit.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load(['js/controllers/coupons/coupons_detail_edit.js', 'js/services/coupons/coupons_detail_edit.js']);
                            }]
                    }
                })


                //advertisementType
                .state('app.advertisementType', {
                    url: '/advertisement/type',
                    templateUrl: 'tpl/advertisement/advertisement_type.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load(['css/content-css/advertisement/advertisement_type.css']);
                            }]
                    }
                })
                //notice
                .state('app.notice', {
                    url: '/notice',
                    templateUrl: 'tpl/notice/notice.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/notice/notice.js',
                                    'js/services/notice/notice.js'
                                ]);
                            }
                        ]
                    }
                })
                .state('app.noticeDetail', {
                    url: '/notice/detail/:id',
                    templateUrl: 'tpl/notice/notice_detail.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/notice/notice.js',
                                    'js/services/notice/notice.js'
                                ]);
                            }
                        ]
                    }
                })
                .state('app.noticeAdd', {
                    url: '/notice/add',
                    templateUrl: 'tpl/notice/notice_add.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/notice/notice.js',
                                    'js/services/notice/notice.js'
                                ]);
                            }
                        ]
                    }
                })
                .state('app.noticeEdit', {
                    url: '/notice/edit/:id',
                    templateUrl: 'tpl/notice/notice_edit.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/notice/notice.js',
                                    'js/services/notice/notice.js'
                                ]);
                            }
                        ]
                    }
                })
                //accountSetting
                .state('app.accountSetting', {
                    url: '/security/account_setting',
                    templateUrl: 'tpl/security/now_account_internal_edit.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/util/public_key.js',
                                    'js/util/jsencrypt.min.js',
                                    'js/controllers/home/account_setting.js',
                                    'js/services/home/account_setting.js'
                                ]);
                            }
                        ]
                    }
                })

                //mobilePhoneWhite
                .state('app.mobilePhoneWhite', {
                    url: '/mobile/phone/white',
                    templateUrl: 'tpl/systemSetting/mobile_phone_white_view.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/services/mobile_phone_white/mobile_phone_white.js',
                                    'js/controllers/mobile_phone_white/mobile_phone_white.js',
                                ]);
                            }
                        ]
                    }
                })

                //data
                .state('app.transactionAnalysis', {
                    url: '/transaction/analysis',
                    templateUrl: 'tpl/data/transaction_analysis.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'vendor/jquery/echarts-2.2.7/build/dist/echarts-all.js',
                                    'js/controllers/data/transactionChart.js',
                                    'js/services/data/transactionChart.js'
                                ]);
                            }
                        ]
                    }
                })
                .state('app.expenseCalendar', {
                    url: '/expense/calendar',
                    templateUrl: 'tpl/data/expense_calendar.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'vendor/jquery/echarts-2.2.7/build/dist/echarts-all.js',
                                    'js/controllers/data/expense_calendar.js',
                                    'js/services/data/expense_calendar.js'
                                ]);
                            }
                        ]
                    }
                })
                .state('app.consumerTop', {
                    url: '/consumer/top',
                    templateUrl: 'tpl/data/consumer_top.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'vendor/jquery/echarts-2.2.7/build/dist/echarts-all.js',
                                    'js/controllers/data/consumer_top.js',
                                    'js/services/data/consumer_top.js'
                                ]);
                            }
                        ]
                    }
                })
                .state('app.userExpense', {
                    url: '/user/expense/calendar/:id',
                    templateUrl: 'tpl/data/user_expense_calendar.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'vendor/jquery/echarts-2.2.7/build/dist/echarts-all.js',
                                    'js/controllers/data/consumer_top.js',
                                    'js/services/data/consumer_top.js'
                                ]);
                            }
                        ]
                    }
                })
                .state('app.goodsAnalysis', {
                    url: '/goods/analysis',
                    templateUrl: 'tpl/data/goods_analysis.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function ($ocLazyLoad) {
                                return $ocLazyLoad.load([
                                    'js/controllers/data/goodsChart.js',
                                    'js/services/data/goodsChart.js'
                                ]);
                            }
                        ]
                    }
                })
                .state('app.shopAnalysis', {
                    url: '/shop/analysis',
                    templateUrl: 'tpl/data/shop_analysis.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'vendor/jquery/echarts-2.2.7/build/dist/echarts-all.js',
                                    'js/controllers/data/shopChart.js',
                                    'js/services/data/shopChart.js'

                                ]);
                            }
                        ]
                    }
                })
                //extension
                //.state('app.extensionRank', {
                //    url: '/extension/rank',
                //    templateUrl: 'tpl/extension/extension_rank.html'
                //})
                //.state('app.extensionRankAdd', {
                //    url: '/extension/rank/add',
                //    templateUrl: 'tpl/extension/extension_rank_add.html'
                //})
                //.state('app.extensionRankEdit', {
                //    url: '/extension/rank/edit',
                //    templateUrl: 'tpl/extension/extension_rank_edit.html'
                //})

                .state('app.client', {
                    url: '/client',
                    templateUrl: 'tpl/member/client.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/member/client.js',
                                    'js/services/member/client.js'
                                ]);
                            }]
                    }
                })

                .state('app.clientAdd', {
                    url: '/client/add',
                    templateUrl: 'tpl/member/client_add.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/member/client.js',
                                    'js/services/member/client.js'
                                ]);
                            }]
                    }
                })

                .state('app.clientUpdate', {
                    url: '/client/update/:id',
                    templateUrl: 'tpl/member/client_update.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/member/client.js',
                                    'js/services/member/client.js'
                                ]);
                            }]
                    }
                })
                .state('app.memberCharge', {
                    url: '/member/charge',
                    templateUrl: 'tpl/member/member_charge.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/member/member_card_charge.js',
                                    'js/services/member/member_card_charge.js',
                                    'js/controllers/member/balance_history.js',
                                    'js/services/member/balance_history.js'
                                ]);
                            }]
                    }
                })
                .state('app.memberChargeAdd', {
                    url: '/member/charge/add',
                    templateUrl: 'tpl/member/member_charge_add.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/member/member_card_charge.js',
                                    'js/services/member/member_card_charge.js'
                                ]);
                            }]
                    }
                })
                .state('app.memberChargeUpdate', {
                    url: '/member/charge/update/:id',
                    templateUrl: 'tpl/member/member_charge_update.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/member/member_card_charge.js',
                                    'js/services/member/member_card_charge.js'
                                ]);
                            }]
                    }
                })
                .state('app.memberCard', {
                    url: '/member/card',
                    templateUrl: 'tpl/member/member_card.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'css/content-css/member/member_card.css',
                                    'js/controllers/member/member_card.js',
                                    'js/services/member/member_card.js'
                                ]);
                            }]
                    }
                })
                .state('app.memberCardAdd', {
                    url: '/member/card/add/:type',
                    templateUrl: 'tpl/member/member_card_add.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/member/member_card_add.js',
                                    'js/services/member/member_card_add.js'
                                ]);
                            }]
                    }
                })
                .state('app.memberCardUpdate', {
                    url: '/member/card/update/:id',
                    templateUrl: 'tpl/member/member_card_update.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/member/member_card_update.js',
                                    'js/services/member/member_card_update.js'
                                ]);
                            }]
                    }
                })

                .state('app.memberTransaction',{
                    url:"/member/transaction",
                    templateUrl:'tpl/member/member_transaction.html',
                    resolve:{
                        deps:['uiLoad',
                            function(uiLoad){
                                return uiLoad.load([
                                    'js/controllers/member/member_transaction.js',
                                    'js/services/member/member_transaction.js'
                                ])
                            }
                        ]
                    }
                })


                //postageTemplate
                .state('app.postage', {
                    url: '/postage',
                    templateUrl: 'tpl/postage/postage.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/postage/postage.js',
                                    'js/services/postage/postage.js'
                                ]);
                            }]
                    }
                })

                .state('app.postageAdd', {
                    url: '/postage/add',
                    templateUrl: 'tpl/postage/postage_add.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/postage/postage.js',
                                    'js/services/postage/postage.js'
                                ]);
                            }]
                    }
                })


                .state('app.postageEdit', {
                    url: '/postage/edit/:id',
                    templateUrl: 'tpl/postage/postage_edit.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/postage/postage.js',
                                    'js/services/postage/postage.js'
                                ]);
                            }]
                    }
                })

                //��ӡ������
                .state('app.printer', {
                    url: '/printer',
                    templateUrl: 'tpl/printer/printer.html',
                    resolve: {
                        deps: ['$ocLazyLoad',
                            function( $ocLazyLoad ){
                                return $ocLazyLoad.load('vr.directives.slider').then(
                                    function(){
                                        return $ocLazyLoad.load([
                                            'js/controllers/printer/printer.js',
                                            'js/services/printer/printer.js'
                                        ]);
                                    }
                                );
                            }]
                    }
                })

                .state('app.printerTemplate', {
                    url: '/printer/template',
                    templateUrl: 'tpl/printer/printer_template.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/printer/printer_template.js',
                                    'js/services/printer/printer_template.js'
                                ]);
                            }]
                    }
                })


                .state('app.printerTemplateAdd', {
                    url: '/printer/template/add',
                    templateUrl: 'tpl/printer/printer_template_add.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'css/content-css/printer/printer_template_ae.css',
                                    'js/controllers/printer/printer_template_add.js',
                                    'js/services/printer/printer_template_add.js'
                                ]);
                            }]
                    }

                })


                .state('app.printerTemplateEdit', {
                    url: '/printer/template/edit/:id',
                    templateUrl: 'tpl/printer/printer_template_edit.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'css/content-css/printer/printer_template_ae.css',
                                    'js/controllers/printer/printer_template_edit.js',
                                    'js/services/printer/printer_template_edit.js'
                                ]);
                            }]
                    }

                })

                //table_number
                .state('app.table', {
                    url: '/table',
                    templateUrl: 'tpl/table/table.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'css/content-css/table/table.css',
                                    'js/controllers/table/table.js',
                                    'js/services/table/table.js'
                                ]);
                            }]
                    }
                })

                .state('app.tableType', {
                    url: '/table/type',
                    templateUrl: 'tpl/table/table_type.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'js/controllers/table/table_type.js',
                                    'js/services/table/table_type.js'
                                ]);
                            }]
                    }
                })



                //help
                .state('help', {
                    abstract: true,
                    url: '/help',
                    template: '<div class="h-full"><div ui-view class="fade-in-right-big smooth" ng-init="app.settings.headerFixed=false"></div> </div>'
                })

                .state('help.info', {
                    url: '/info',
                    templateUrl: 'tpl/help/help.html',
                    resolve: {
                        deps: ['uiLoad',
                            function (uiLoad) {
                                return uiLoad.load([
                                    'css/content-css/help/help.css'
                                ]);
                            }]
                    }
                })
                .state('app.promotionPoster',{
                    url:'/promotion/poster',
                    templateUrl:'tpl/marketingManager/promotion_poster.html',
                    resolve:{
                        deps:['$ocLazyLoad',function($ocLazyLoad){
                            return $ocLazyLoad.load('angularFileUpload').then(function(){
                                return $ocLazyLoad.load([
                                    'css/content-css/marketingManager/promotion_poster.css',
                                    'js/controllers/marketingManager/promotion_poster.js',
                                    'js/services/marketingManager/promotion_poster.js'
                                ])
                            });
                        }]
                    }
                })
                .state('app.promotionPosterAdd',{
                    url:'/promotion/poster/add/:id',
                    templateUrl:'tpl/marketingManager/promotion_poster_add.html',
                    resolve:{
                        deps:['$ocLazyLoad',function($ocLazyLoad){
                            return $ocLazyLoad.load('angularFileUpload').then(function(){
                                return $ocLazyLoad.load([
                                    'css/content-css/marketingManager/promotion_poster.css',
                                    'js/controllers/marketingManager/promotion_poster_add.js',
                                    'js/services/marketingManager/promotion_poster_add.js'
                                ])
                            });
                        }]
                    }
                })
                .state('app.fullReduction',{
                    url:'/full/reduction',
                    templateUrl:'tpl/marketingManager/full_reduction.html',
                    resolve:{
                        deps:[
                            '$ocLazyLoad',function($ocLazyLoad){
                                return $ocLazyLoad.load([
                                    'js/controllers/marketingManager/full_reduction.js',
                                    'js/services/marketingManager/full_reduction.js'
                                ])
                            }
                        ]
                    }
                })
                .state('app.fullReductionAdd',{
                    url:'/full/reduction/add',
                    templateUrl:'tpl/marketingManager/full_reduction_add.html',
                    resolve:{
                        deps:[
                            '$ocLazyLoad',function($ocLazyLoad){
                                return $ocLazyLoad.load([
                                    'js/controllers/marketingManager/full_reduction_add.js',
                                    'js/services/marketingManager/full_reduction_add.js'
                                ])
                            }
                        ]
                    }
                })
                .state('app.fullReductionEdit',{
                    url:'/full/reduction/edit/:id',
                    templateUrl:'tpl/marketingManager/full_reduction_edit.html',
                    resolve:{
                        deps:[
                            '$ocLazyLoad',function($ocLazyLoad){
                                return $ocLazyLoad.load([
                                    'js/controllers/marketingManager/full_reduction_edit.js',
                                    'js/services/marketingManager/full_reduction_edit.js'
                                ])
                            }
                        ]
                    }
                })

                //booking
                .state('app.booking',{
                    url:'/booking',
                    templateUrl:'tpl/booking/booking.html',
                    resolve:{
                        deps:[
                            '$ocLazyLoad',function($ocLazyLoad){
                                return $ocLazyLoad.load([
                                    'js/controllers/booking/booking.js',
                                    'js/services/booking/booking.js',
                                    'css/content-css/booking/booking.css',
                                ])
                            }
                        ]
                    }
                })
                .state('app.redPacket',{
                    url:'/red/packet',
                    templateUrl:'tpl/marketingManager/red_packet.html',
                    resolve:{
                        deps:['$ocLazyLoad',function($ocLazyLoad){
                            return $ocLazyLoad.load([
                                'js/controllers/marketingManager/red_packet.js',
                                'js/services/marketingManager/red_packet.js'
                            ])
                        }]
                    }
                })
                .state('app.redPacketAdd',{
                    url:'/red/packet/add',
                    templateUrl:'tpl/marketingManager/red_packet_add.html',
                    resolve:{
                        deps:['$ocLazyLoad',function($ocLazyLoad){
                            return $ocLazyLoad.load([
                                'js/controllers/marketingManager/red_packet_add.js',
                                'js/services/marketingManager/red_packet_add.js'
                            ])
                        }]
                    }
                })
                .state('app.redPacketEdit',{
                    url:'/red/packet/edit',
                    templateUrl:'tpl/marketingManager/red_packet_edit.html',
                    resolve:{
                        deps:['$ocLazyLoad',function($ocLazyLoad){
                            return $ocLazyLoad.load([
                                'js/controllers/marketingManager/red_packet_edit.js',
                                'js/services/marketingManager/red_packet_edit.js'
                            ])
                        }]
                    }
                })
        }
    ]
    );
